*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}
.ul{
    float: left;
    position: fixed;
    right: 100px;
    bottom: 100px;
}
.ul>li{
    list-style: none;
    width: 50px;
    height: 50px;
    border: 1px solid red;
    overflow: hidden;
    position: relative;
}
.s{
    width: 50px;
    height: 50px;
}
.a{
    width: 50px;
    height: 50px;
    background-color: yellow;
    position: absolute;
    left: 0px;
    top: 0px;
    transform: rotate(45deg);
    transform-origin: -50px 50px;
    transition: 0.5s;
}
.ul>li:hover>.a{
    transform: rotate(0deg);
}